package com.vogue.supplymall.order.domain.service;

import com.vogue.supplymall.common.domain.dto.EditCartInfo;
import com.vogue.supplymall.common.domain.dto.OrderDetailInfo;
import com.vogue.supplymall.common.domain.dto.OrderInfo;
import com.vogue.supplymall.order.domain.model.OrderItemProduct;

import java.util.List;
import java.util.Map;

/**
 * The interface Order item product service.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-01-10
 */
public interface OrderItemProductService extends BaseService<OrderItemProduct, Long> {

    /**
     * Find cart list.
     *
     * @param editCartInfo the edit cart info
     * @return the list
     */
    List<Map<String, Object>> findCart(EditCartInfo editCartInfo);

    /**
     * Find cart count map.
     * 查询购物车数量
     *
     * @param editCartInfo the edit cart info
     * @return the map
     */
    Long findCartCount(EditCartInfo editCartInfo);

    /**
     * Find order list.
     *
     * @param orderInfo the order info
     * @return the list
     */
    List<Map<String, Object>> findOrder(OrderInfo orderInfo);

    /**
     * Add order item product order item product.
     *
     * @param orderItemProduct the order item product
     * @return the order item product
     */
    OrderItemProduct addOrderItemProduct(OrderItemProduct orderItemProduct);

    /**
     * Gets order item product by sql.
     *
     * @param orderid    the orderid
     * @param productid  the productid
     * @param attrplanid the attrplanid
     * @param storageid  the storageid
     * @return the order item product by sql
     */
    OrderItemProduct getOrderItemProductBySql(Long orderid, Long productid, Long attrplanid, Long storageid);

    /**
     * Find order product list.
     *
     * @param orderDetailInfo the order detail info
     * @return the list
     */
    List<Map<String, Object>> findOrderProduct(OrderDetailInfo orderDetailInfo);

    /**
     * 根据商品、仓库、计划id 查询购物车中是否已经有不同规格的商品
     * @param editCartInfo
     * @return
     */
    Long getItemAndStorage(EditCartInfo editCartInfo);
}
